package com.own.core.object.lookup.address;

import java.util.Set;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;

import com.own.core.html.form.object.ObjectField;
import com.own.core.object.lookup.Lookup;

@Entity
@DiscriminatorValue("Country")
public class Country extends Lookup {

//	@ObjectField
	Set<City> city;

	public Country() {
	}

	public Country(String name) {
		this.name = name;
	}

	// bi-directional many-to-one association to Account
	@OneToMany(mappedBy = "country", fetch = FetchType.LAZY)
	public Set<City> getCity() {
		return city;
	}

	public void setCity(Set<City> city) {
		this.city = city;
	}

}
